﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Demo Counter(page)</title>
    <style type="text/css">
        @media print
        {
            BODY
            {
                font-size: 10pt;
                line-height: 120%;
                background: white;
            }
        }

        @media screen
        {
            BODY
            {
                font-size: medium;
                line-height: 1em;
                background: silver;
            }
        }

        body
        {
            counter-reset: section;
        }

        div.page
        {
            counter-reset: subsection;
        }

            div.page:before
            {
                counter-increment: section;
                content: "Trang " counter(section);
            }
    </style>
</head>
<body>
    <p>aaa</p>
    <p>bbb</p>
    <div class="page"></div>

    <p>aaa</p>
    <p>bbb</p>
    <div class="page"></div>
</body>
</html>

